package com.xinzhi.service.impl;

import com.xinzhi.mapper.LfaMapper;
import com.xinzhi.pojo.LfaUser;
import com.xinzhi.service.LfaService;
import com.xinzhi.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.lang.reflect.Type;
import java.util.List;

@Service
public class LfaServicelmpl<L extends LfaServicelmpl, I extends Number> implements LfaService {

    @Autowired
    private LfaMapper lfaMapper;

    @Override
    public Result deleteType() {
        return null;
    }
//
//    @Override
//    public List<LfaUser> selectList(Type type) {
//        return null;
//    }

    @Override
    public List<LfaUser> selectList(Integer type) {
        List<LfaUser> lfaUsers = lfaMapper.selectList(type);
        return lfaUsers;
    }

    @Override
    public Result lynupdate(Integer twoIndexid, Integer type) {
        int lynupdate = lfaMapper.lynupdate(twoIndexid, type);
        if (lynupdate > 0) {
            // 返回更新成功的结果或其他逻辑处理
            return Result.ok("删除成功");
        } else {
            return Result.error("删除失败");
        }
    }


}


